package cn.pku.ss.sirx.sna.ib.bean;

import java.util.LinkedList;

/**
 * Abstract of a tree node in a reply tree.
 * A tree node represents a message.
 *
 * @author SirX
 * @version 1.0
 */
public class ReplyTreeNode {

    /**
     * Constructor.
     * @param message message of the node
     */
    public ReplyTreeNode(Message message) {
        this.message = message;
        this.children = new LinkedList<ReplyTreeNode>();
    }
    
    public Message getMessage() {
        return message;
    }

    public LinkedList<ReplyTreeNode> getChildren() {
        return children;
    }
    
    @Override
    public String toString() {
        return this.message.toString();
    }
    
    //////////////////////////////////////////////////////////////////////////////

    private Message message;
    private LinkedList<ReplyTreeNode> children;

}
